package com.william.jdbcplus.core.dialects.ddl.index;

import com.william.jdbcplus.core.metadata.TableIndexInfo;
import com.william.jdbcplus.common.entity.Entity;

public interface IIndex {
    /**
     * 新建索引
     *
     * @param clazz
     * @param indexInfo
     * @param <M>
     * @return
     */
    <M extends Entity> String add(Class<M> clazz, TableIndexInfo indexInfo);

    /**
     * 修改索引
     *
     * @param clazz
     * @param indexInfo
     * @param <M>
     * @return
     */
    <M extends Entity> String modify(Class<M> clazz, TableIndexInfo indexInfo, TableIndexInfo dbIndex);

    /**
     * 删除索引
     *
     * @param clazz
     * @param dbIndex
     * @param <M>
     * @return
     */
    <M extends Entity> String drop(Class<M> clazz, TableIndexInfo dbIndex);

    /**
     * 删除唯一键索引
     *
     * @param clazz
     * @param dbIndex
     * @param <M>
     * @return
     */
    <M extends Entity> String dropUk(Class<M> clazz, TableIndexInfo dbIndex);

}
